<template>
    <div class="cart-list">
      <Scroll class="wrapper" ref="scroll">
        <cart-list-item v-for="(item,index) in cartList" :key="index" :item-info="item"></cart-list-item>
      </Scroll>
    </div>
</template>

<script>
import Scroll from 'components/common/scroll/Scroll'
import CartListItem from './CartListItem'
import { mapGetters } from 'vuex'
export default {
  name: 'CartList',
  components: {
    Scroll,
    CartListItem
  },
  computed: {
    ...mapGetters(['cartList'])
  },
  activated () {
    this.$refs.scroll.refresh()
  }
}
</script>

<style scoped lang="scss">
.cart-list{
  height: calc(100% - 44px - 44px - 40px);
  .wrapper{
    height: 100%;
    overflow: hidden;
  }
}
</style>
